package com.jsbs.iam.ident.mapper;

import com.jsbs.iam.ident.dto.ApplyConfigGetDto;
import com.jsbs.iam.ident.dto.ApplyTypeDeleteDto;
import com.jsbs.iam.ident.dto.UserInfoDeleteDto;
import com.jsbs.iam.ident.vo.ApplyAccountVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @BelongsProject: iam
 * @BelongsPackage: com.jsbs.iam.ident.mapper
 * @Author: WangJiYuan
 * @Description: TODO
 * @Version: 2023-01-16  19:36
 */
@Mapper
@Repository
public interface UserApiMapper {
    /**
     * 删除账户数据
     * @param deleteDto
     * @return
     */
    int deleteAccount(@Param("deleteDto") UserInfoDeleteDto deleteDto);

    /**
     * 删除异常登录策略
     * @param deleteDto
     */
    void deleteExceptionLoginStrategy(@Param("deleteDto")ApplyTypeDeleteDto deleteDto);

    /**
     * 删除登录策略
     * @param deleteDto
     */
    void deleteLoginStrategy(@Param("deleteDto")ApplyTypeDeleteDto deleteDto);

    /**
     * 删除多设备策略
     * @param deleteDto
     */
    void deleteMultideviceStrategy(@Param("deleteDto")ApplyTypeDeleteDto deleteDto);

    /**
     * 删除密码策略
     * @param deleteDto
     */
    void deletePasswordStrategy(@Param("deleteDto")ApplyTypeDeleteDto deleteDto);

    /**
     * 根据用户数据查询账号数据
     * @param applyConfigGetDto
     * @return
     */
    List<ApplyAccountVo> getAccountDataByUser(@Param("applyConfigGetDto")ApplyConfigGetDto applyConfigGetDto);
}
